package org.jeecg.modules.jxc.goodstype.controller;

import org.jeecg.modules.jxc.goodstype.entity.Unit;
import org.jeecg.modules.jxc.goodstype.service.UnitService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @description:
 * @company: yaorange
 * @author: Mr.Yu
 * @version: 1.0
 * @create: 2021-12-22 15:59:40
 */

@RestController
@RequestMapping("/unit")
public class UnitController {

    @Autowired
    private UnitService unitService;

    @GetMapping("/list")
    public ResponseEntity<List<Unit>> unitList(){
        List<Unit> list=unitService.select();
        return ResponseEntity.ok(list);
    }
}
